package nz.ac.massey.cs.se400_2013.ass3.plugin;

import javax.swing.JPanel;

import nz.ac.massey.cs.se400_2013.ass3.Course;
import nz.ac.massey.cs.se400_2013.ass3.EditorPlugin;
import nz.ac.massey.cs.se400_2013.ass3.Paper;
import nz.ac.massey.cs.se400_2013.ass3.Student;

public class CourseEditor implements EditorPlugin{

	private CourseEditorUi editor = new CourseEditorUi();

	public JPanel getEditor() {
		return editor;
	}

		public void edit(Object obj) {
			this.editor.setName(((Course)obj).getName());
		}

	public boolean canEditInstanceOf(Class type) {
		if(type == Course.class){
			return true;
		}
		return false;
	}

}
